/*
 * Copyright 2011 The Rusted Roof, LLC.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package org.proteusframework.api.config;

/**
 * Collection of well-defined configuration property prototypes. Any plugin may optionally use these properties
 * instead of defining their own so long as their definition and use of the property matches the JavaDocs herein.
 *
 * @author Tacoma Four
 */
public final class StandardConfigProperty
{
    /**
     * Property prototype that defines a mandatory physical File property.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_FILE = new ConfigPropertyBuilder("file")
            .setDescription("File that backs that seed")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory fully qualified Java clas name.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_CLASS = new ConfigPropertyBuilder("class")
            .setDescription("Fully qualified class")
            .setExample("com.therustedroof.foo.bar.SomeClass")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory, arbitrary configuration path.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_PATH = new ConfigPropertyBuilder("path")
            .setDescription("Contextual path")
            .setExample("/some/arbitrary/path")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory, arbitrary configuration path.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_PATHS = new ConfigPropertyBuilder("paths")
            .setDescription("String[] of contextual paths")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defins a mandatory index location. The base of the index (e.g. zero-based) is
     * context senstive; see the implementing plugin's documentation for additional details.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_INDEX = new ConfigPropertyBuilder("index")
            .setDescription("Index location")
            .setExample("23")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory user name used in an authentication process.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_USERNAME = new ConfigPropertyBuilder("username")
            .setDescription("Username")
            .setExample("tacomafour")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines mandatory credentials used in an authentication process.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_CREDENTIALS = new ConfigPropertyBuilder("credentials")
            .setDescription("Credentials")
            .setExample("secret")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory context-sensitive message.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_MESSAGE = new ConfigPropertyBuilder("message")
            .setDescription("Message")
            .setExample("this is a secret message")
            .setMandatory(true)
            .buildPrototype();

    /**
     * Property prototype that defines a mandatory MIME type.
     */
    public static final IConfigPropertyPrototype CONFIGPROPERTY_MIME_TYPE = new ConfigPropertyBuilder("mimeType")
            .setDescription("Mime type")
            .setExample("application/octet-stream")
            .setMandatory(true)
            .buildPrototype();
}
